package com.example.demo.vo;

import com.diboot.core.binding.annotation.*;
import com.example.demo.entity.ProcurementPlanItem;
import com.example.demo.entity.ProcurementPlan;
import com.example.demo.entity.Unit;
import com.diboot.iam.entity.IamUser;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import java.util.List;

/**
 * 采购计划项 ListVO定义
 * @author MyName
 * @version 1.0
 * @date 2024-01-18
 * Copyright © MyCompany
 */
@Getter
@Setter
@Accessors(chain = true)
public class ProcurementPlanItemListVO extends ProcurementPlanItem {

    private static final long serialVersionUID = -3337639525542929968L;

    /**
     * 关联字段 名称：Unit.name
     */
    @BindField(entity = Unit.class, field = "name", condition = "this.unit_id=id")
    private String unitName;

    /**
     * 关联字段 系统用户.真实姓名：IamUser.realname
     */
    @BindField(entity = IamUser.class, field = "realname", condition = "this.create_by=id")
    private String createByName;

    /**
     * 关联字段 系统用户.真实姓名：IamUser.realname
     */
    @BindField(entity = IamUser.class, field = "realname", condition = "this.update_by=id")
    private String updateByName;

    /**
     * 关联字典：ORDERSTATUS
     */
    @BindDict(type = DICT_ORDERSTATUS, field = "status")
    private String statusLabel;
}
